<?php
/**
 * Company_model Class
 *
 */
final class Messages_model extends  CI_Model {
	/**
	 * Constructor
	 */
	function __construct()
         {
            parent::__construct();  
            $this->load->database();
	}
	
	public function _loadNewMassage()
	{
			$date="Y-m-d";
            $data = array();
            $data = $this->db->query("SELECT *, SUBSTR(insert_date, 1,10)AS date FROM m_user where insert_date >= curdate()")->result_array();
            
            return $data;
	}
	
	public function _loadJml()
	{
            $data = array();
            $data = $this->db->query("SELECT count(id_role) as total FROM m_user where insert_date >= curdate()")->row_array();
            
            return $data;
	}

}
